Repository navigation
Conversation
size-limit report 📦Compared: 7107c9f (PR test merge using develop at 9279303) Against: 9279303 (develop) · base run #66015 ✅ Baseline matches: this diff contains only this PR's changes.
|
Optional E2E testsAll optional checks were successful. 4 successful. See the run. Successful checks
|
f7fe7e8 to
0c37b6f
Compare
…gin instead of globs The SDK turns on hidden source maps for the client build and for Nitro's server build. It now asks the bundler plugin to remove them through `deleteSourcemapsAfterUpload` and `sdkEnabledSourceMaps`, which receive the Vite environment, instead of building `filesToDeleteAfterUpload` globs from the resolved output directories. As before, the maps are also removed when no upload runs. The maps of the Nitro `ssr` service stay, because the SDK's own Nitro plugin reads them after the build. A user's `filesToDeleteAfterUpload` is passed through and runs as well. Maps the user turned on with `build.sourcemap` or Nitro's options are kept. Maps of an output with its own `sourcemap` are removed when the SDK turned on source maps for its environment.
0c37b6f to
560f372
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 560f372. Configure here.
| filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload, | ||
| // Called when the bundler plugin decides, after the SDK's enable plugins ran. | ||
| deleteSourcemapsAfterUpload: environment => | ||
| sourcemaps?.deleteSourcemapsAfterUpload ?? (hasSdkEnabledSourceMaps(state, environment) || undefined), |
There was a problem hiding this comment.
User globs no longer replace SDK deletion
Medium Severity
Setting sourcemaps.filesToDeleteAfterUpload used to replace the SDK's automatic map deletion. It is now passed through while deleteSourcemapsAfterUpload still strips SDK-enabled maps, so a custom or empty glob no longer keeps those files. Apps that relied on that option to preserve server maps or skip cleanup will lose them, and there is no migration note for the new deleteSourcemapsAfterUpload: false escape hatch.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 560f372. Configure here.
| "build-command": "pnpm test:build:no-upload", | ||
| "assert-command": "pnpm test:assert:no-upload", | ||
| "label": "tanstackstart-react-sourcemaps (no upload)" | ||
| } |
There was a problem hiding this comment.
Missing keep-maps E2E variant
Low Severity
The sourcemaps E2E app adds a no-upload variant that expects maps to be gone, but it has no deleteSourcemapsAfterUpload: false run that expects .map files and sourceMappingURL comments to remain in .output/public. A regression that always strips maps would not fail these tests.
Reviewed by Cursor Bugbot for commit 560f372. Configure here.


TanStack Start built its own
filesToDeleteAfterUploadglobs from the resolved output directories, which needed a Vite 8 check and a list of Nitro service directories to stay out of. The SDK now passes the internaldeleteSourcemapsAfterUploadandsdkEnabledSourceMapsfunction options, which receive the Vite environment name. It returnstruefor the top-level decision when it setbuild.sourcemap: 'hidden', and for thenitroenvironment when it set Nitro'ssourcemapitself. The bundler plugin then removes those maps. As before, it also removes them when no upload runs, for example without an auth token.The
ssrNitro service keeps its maps.applyToEnvironmentkeeps the Sentry plugins out of Nitro service environments, and the SDK'smakeComposeNitroServiceSourceMapsPluginreads those maps in itsloadhook when Nitro bundles the service output again.Maps the user turned on with
build.sourcemap, an environment'sbuild.sourcemap, top-levelbuild.rolldownOptions.output.sourcemapor Nitro's options are kept, as before. A user'sfilesToDeleteAfterUploadis passed through and runs together with the SDK's deletion, as before.Two behaviour changes. First, when the SDK turned on source maps, an environment output that sets its own
sourcemap(for exampleenvironments.client.build.rolldownOptions.output.sourcemap) now has its maps removed too, visible ones included, like the other SDKs. Develop kept them. Second, on Vite 7 the old globs only coveredbuild.outDir, so the SDK-enablednitromaps in.output/serverstayed (the SDK warned about this). The bundler plugin now removes them too.The
tanstackstart-react-sourcemapsE2E app gets a no-upload variant that asserts no maps and nosourceMappingURLcomments in.output. Both TanStack Start E2E apps now record chunks without a map ingenerateBundle, because the plugin removes maps beforewriteBundle. This depends on #26281.